package com.jay.io.clazz;

import java.io.BufferedReader;
import java.io.EOFException;
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;

public class StringReaderWriterCls {
	public static void main(String[] args) throws IOException {
		try {
			BufferedReader in4 = new BufferedReader(new StringReader(
					"asdfsadsad  dsad"));
			StringWriter out1 = new StringWriter();
			String s = null;
			while ((s = in4.readLine()) != null) {
				out1.write(s);
			}
			out1.write("||end");
			System.out.println(out1);
			out1.close();
		} catch (EOFException e) {
			System.err.println("End of stream");
		}

	}

}
